package code.structure.module.scene.view.iso.product
{
	import code.structure.module.scene.view.iso.product.base.ProductedCIsoObject;

	/**
	 *果树 
	 * @author Yuri
	 * 
	 */
	public class ProductTreeIsoObject extends ProductedCIsoObject
	{
		public function ProductTreeIsoObject()
		{
			super();
		}
		
		/**
		 * 
		 * 刷新生产信息 进行后续操作
		 */
		override protected function refreshProductData():void
		{
			if(data.growTimes<=0){
				withered(); //特殊处理
			}else{
				if(data.endTime<=0){
					ripe();
				}else{
					product();
				}
			}
		}
		
		/**
		 *造好回调  (待定)
		 * 
		 */
		override public function initBuildCallFun():void{
			data.endTime = productShopItemData.productAttachData.growTime; //重复生产 接着倒计时
			data.growTimes = productShopItemData.productAttachData.growCount;
			data.status = 4;
			refreshProductData();
		}
	}
}